<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>评论管理</title>
<import type='css' file="css.main" />
<load href="__PUBLIC__/js/jquery-1.9.1.min.js" />
<import type='js' file="js.main" />
</head>

<body>
<!-- 预览窗口开始 -->
<div class="previewbg" style="display:none;">
	<input style="margin-top:92px; width:350px;"></input>
	<iframe id="previewwidnow" src="" frameborder="0" scrolling="auto" style="margin-top:0px;"></iframe>
</div>
<div class="main-frame">
	<div class="position">华人码 > 评论管理</div>
	<div class="table-list">
	 <table width="100%" border="1" cellspacing="0" cellpadding="0" class="indextable">
		    <tr class="th-bg">
		      <th width="4%">序号</th>
		      <th width="26%">内容标题</th>
		      <th width="8%">评论昵称</th>
			  <th width="30%">评论内容</th>
			  <th width="15%">评论时间</th>
		      <th width="10%">操作</th>
	        </tr>
	        <volist name='messagelist' id='v' empty="暂无评论">
		    <tr class="tr-line">
		      <td>{$v.id}</td>
		      <td style="text-align:left; padding-left:6px;"><a class='preview' path="{:U('Home/Article/index',array('id'=>$v['articleid']))}">{:W('Menutype/getarticleinfo',array('id'=>$v['articleid'],'field'=>'title'))}</a></td>
		      <td>{$v['usernickname']}</td>
		      <td>{$v['ucontent']}</td>
		      <td>{$v['cdate']}</td>
		      <td><a class="resdel" style="background-color: #ff5454; padding: 3px 10px; color: #fff; border-radius: 5px;" refurl="{:U('delete',array('id'=>$v['id']))}">删除</a></td>
	        </tr>
	        </volist>
      </table>
    </div>
	<div class="page">{$page}</div>
</div>
<script type="text/javascript">
	$(function(){
		$("a.resdel").each(function(index, element) {
			var t = $(this);
			t.click(function(){
				var r=confirm("想好！确定要删除吗？");
				if (r==true){
					var refurl = $(this).attr('refurl');
					location.href = refurl;
				}else{
					return false;
				}
			})
		});
	})
</script>
</body>
</html>
